-
-
Notifications
You must be signed in to change notification settings - Fork 4
Tinymce in text widget #275
Tinymce in text widget #275
Conversation
This uses a combination of vanilla JS and jQuery, but that's what the widget uses already. (Yes, the code we've inherited here is a real dog's breakfast.) At a later date we can work on replacing this with purely vanilla JS once we have it all working. This still leaves one thing not working correctly. If two Text widgets are added in the Customizer, the second won't open; that probably needs a fix in a different file. I will investigate.
LGTM - tested locally and Text Widgets have TinyMCE restored. |
I think there's something more to be done for the Customizer; at the moment, if you add two Text widgets there, the second won't open until you refresh the page. |
Nearly there now, I think! The last patch also fixed the sending of input to the database and refreshing the view in the Customizer. The remaining issue is that, after adding a Text widget in the Customizer, it's not actually possible to type in the Visual tab: only in the Text tab and the title. After refreshing the page, this works fine. |
The last patch should have resolved the outstanding issue. I just increased the time for TinyMCE to destroy its previous instance before attempting to create a new one. |
It's in Chrome. |
I can't reproduce that on Chrome on Linux. I'll try another computer with Windows later. |
I have now reproduced it on Windows (and it's also the case with the Custom HTML widget). It looks like a new |
I've just an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now works sell also in chrome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
Two recent approvals after further browser testing. |
This addresses Issue #273.
Description
Adds back scripts that were omitted from
~/wp-includes/script-loader.php
. Also adds back code that was previously removed from~wp-admin/js/widgets/text-widgets.js
because the lack of the missing scripts caused the widget otherwise to generate many errors.Motivation and context
This re-enables the usage of the TinyMCE editor in the text widget.
How has this been tested?
On my localhost test installation.
Screenshots
Before
After
Types of changes